import operate from "@/assets/images/svg/operate.svg";
import manage from "@/assets/images/svg/manage.svg";
import data from "@/assets/images/svg/data.svg";
import monitor from "@/assets/images/svg/monitor.svg";
import { useDataDashboardThemeStoreHook } from "@/store/modules/data-dashboard-theme";

export const PAGE_LAYOUT = "->,total, sizes, prev, pager, next, jumper";

export const PAGE_LAYOUTS = " ->,total, sizes, prev, pager, next, jumper";
export const PAGE_LAYOUTLEFT = " <-,prev, pager, next";
export const PAGE_LAYOUTLEFTS = " <-,prev, pager, next,total";
/** websocket和轮询http接口域名 */
// export const SOCKET_HTTP_URL="yc01.tst.fourwell.net"
export const SOCKET_HTTP_URL = window.location.host;
// export const SOCKET_HTTP_URL = "192.168.1.62:8088"

// 手机号正则校验
export const PHONE_REG = {
  role: /^1[3456789]\d{9}$/,
  text: "请输入正确的手机号"
};
// 密码正则校验
export const PASSWORD_REG = {
  role: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9a-zA-Z-`=\[\];',.~!@#$%^&*()_+|{}:"?]{8,16}$/,
  text: "密码必须包含至少两种字符类型(字母、数字、符号),长度在8到16位之间"
};
// 密码正则校验
export const PASSWORD_REGS = {
  role: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9a-zA-Z-`=\[\];',.~!@#$%^&*()_+|{}:"?]{6,16}$/,
  text: "密码必须包含至少两种字符类型(字母、数字、符号),长度在8到16位之间"
};
/** 账号校验规则 */
export const ACCOUNT_REG = {
  inputFormat: /[^0-9a-zA-Z]/g,
  role: /^[0-9a-zA-Z]+$/,
  text: "账号仅能包含数字与字母"
};
/** 别名校验规则 */
export const NAME_REG = {
  inputFormat: /[^0-9a-zA-Z]/g,
  role: /^[0-9a-zA-Z]+$/,
  text: "别名仅能包含数字与字母"
};
/** 流量卡校验规则 flowCardchange */
export const FLOWCARD_REG = {
  inputFormat: /[^0-9a-zA-Z]/g,
  role: /^[0-9a-zA-Z]+$/,
  text: "流量卡仅能包含数字与字母"
};
/** 序列号校验规则 flowCardchange */
export const DEVICESN_REG = {
  inputFormat: /[^0-9a-zA-Z]/g,
  role: /^[0-9a-zA-Z]+$/,
  text: "序列号仅能包含数字与字母"
};
/** 正整数校验规则（不包括0） */
export const INTEGER_REG = {
  inputFormat: /[^0-9]/g,
  role: /^[1-9]\d*$/,
  text: "请输入正整数"
};
/** 正整数校验规则 */
export const INTEGER_REG_ZERO = {
  inputFormat: /[^0-9]/g,
  role: /^[0-9]\d*$/,
  text: "请输入大于等于0的正整数"
};
/**
 * 平台类型
 */
export enum PLATFORM_Map {
  /** 管理平台 */
  manage = 1,
  /** 单位平台 */
  // unit = 2,
  /** 数据大屏 */
  data = 3,
  /** 运营平台 */
  operate = 4,
  /** APP端 */
  app = 5,
  /** 监管平台 */
  monitor = 6
}

export const PLATFORM_LIST = {
  [PLATFORM_Map.manage]: {
    name: "管理平台",
    title: "管理",
    value: PLATFORM_Map.manage,
    icon: manage
  },
  [PLATFORM_Map.operate]: {
    name: "运行平台",
    title: "运行",
    value: PLATFORM_Map.operate,
    icon: operate
  },
  // [PLATFORM_Map.unit]: {
  //   name: "单位平台",
  //   value: PLATFORM_Map.unit
  // },
  [PLATFORM_Map.monitor]: {
    name: "监管平台",
    title: "监管",
    value: PLATFORM_Map.monitor,
    icon: monitor
  },
  [PLATFORM_Map.data]: {
    name: "数据大屏",
    title: "数据",
    value: PLATFORM_Map.data,
    icon: data
  }
};

export const PLATFORM_LIST_SELECT = {
  [PLATFORM_Map.manage]: {
    name: "管理平台",
    value: PLATFORM_Map.manage
  },
  [PLATFORM_Map.operate]: {
    name: "运行平台",
    value: PLATFORM_Map.operate
  },
  // [PLATFORM_Map.unit]: {
  //   name: "单位平台",
  //   value: PLATFORM_Map.unit
  // },
  [PLATFORM_Map.monitor]: {
    name: "监管平台",
    value: PLATFORM_Map.monitor
  },
  [PLATFORM_Map.data]: {
    name: "数据大屏",
    value: PLATFORM_Map.data
  },
  [PLATFORM_Map.app]: {
    name: "APP端",
    value: PLATFORM_Map.app
  }
};
/**
 * 单位类型
 * 1--使用单位
 * 2--监管单位
 * 3--授权商
 */
export enum UNIT_TYPE_Map {
  /** 使用单位 */
  default = 1,
  /** 监管单位 */
  monitor = 2,
  /** 授权商 */
  authorize = 3
}
export const UNIT_TYPE_LIST = {
  [UNIT_TYPE_Map.default]: {
    name: "使用单位",
    value: UNIT_TYPE_Map.default
  },
  [UNIT_TYPE_Map.monitor]: {
    name: "监管单位",
    value: UNIT_TYPE_Map.monitor
  },
  [UNIT_TYPE_Map.authorize]: {
    name: "授权商",
    value: UNIT_TYPE_Map.authorize
  }
};
export const UNIT_TYPE_LIST_FORMCREATE = [
  //   {
  // //    label: "全部",
  //     value: 0
  //   },
  {
    label: "使用单位",
    value: UNIT_TYPE_Map.default
  },
  {
    label: "监管单位",
    value: UNIT_TYPE_Map.monitor
  },
  {
    label: "授权商",
    value: UNIT_TYPE_Map.authorize
  }
];
/** 平台查看类型  */
export enum UNIT_TYPE_VIEW_Map {
  /** 当前单位 */
  current = 1,
  /** 包含下级 */
  include = 2
}
export const UNIT_TYPE_VIEW_Map_LIST = {
  [UNIT_TYPE_VIEW_Map.current]: {
    value: UNIT_TYPE_VIEW_Map.current,
    label: "查看当前单位",
    text: "current"
  },
  [UNIT_TYPE_VIEW_Map.include]: {
    value: UNIT_TYPE_VIEW_Map.include,
    label: "查看所有下级",
    text: "include"
  }
};
/** 图标类型 */
export enum ICON_TYPE_Map {
  /** 监控 */
  monitor = "monitor",
  /** 建筑 */
  point = "location"
}
/** 数据大屏主题配置 */
export enum DATA_DASHBOARD_THEME_Map {
  /** 默认 */
  default = "default",
  /** 自定义1 */
  custom1 = "custom1",
  /** 自定义2 */
  custom2 = "custom2",
  /** 自定义3 */
  custom3 = "custom3"
}
import theme1 from '@/assets/datatheme/preview/theme1.png'
import theme2 from '@/assets/datatheme/preview/theme2.png'
import theme3 from '@/assets/datatheme/preview/theme3.png'
import theme4 from '@/assets/datatheme/preview/theme4.png'
export const DATA_DASHBOARD_THEME_Map_List = [
  {
    value: DATA_DASHBOARD_THEME_Map.default,
    label: "蓝1",
    text: "default",
    img: theme1
  },
  {
    value: DATA_DASHBOARD_THEME_Map.custom1,
    label: "蓝2",
    text: "custom1",
    img: theme2
  },
  {
    value: DATA_DASHBOARD_THEME_Map.custom2,
    label: "灰",
    text: "custom2",
    img: theme3
  },
  {
    value: DATA_DASHBOARD_THEME_Map.custom3,
    label: "绿",
    text: "custom3",
    img: theme4
  }
];
export const APP_THEME_Map_List=[
  {
    value: 'default',
    label: "蓝",
  },
  {
    value: 'custom1',
    label: "绿",
  },
  {
    value: 'custom2',
    label: "橙",
  },
  {
    value: 'custom3',
    label: "紫",
  }
]
import data1 from '@/assets/screenimg/data1.png'
import data2 from '@/assets/datatheme/themea/style1.png'
import data1_1 from '@/assets/screenimg/data2.png'
import munuleft from "@/assets/screenimg/minuleft.png"
import munuright from "@/assets/screenimg/minuright.png"
import  arrrow from '@/assets/screenimg/showleft.png'
import  arrrow1 from '@/assets/screenimg/arrowright.png'
import  arrrow3 from '@/assets/screenimg/showright.png'
import  arrrow4 from '@/assets/screenimg/arrowleft.png'


// 第三版
import datab from '@/assets/datatheme/themeb/style1.png'
import arrowL2 from '@/assets/datatheme/themeb/arrow5.png'
import arrowL2s from '@/assets/datatheme/themeb/arrow6.png'
import arrowR2 from '@/assets/datatheme/themeb/arrow7.png'
import arrowR2s from '@/assets/datatheme/themeb/arrow8.png'
//第四版
import datac from '@/assets/datatheme/themeb/stylec.png'
import menuleft from '@/assets/datatheme/themec/menuleft.png'
import menuright from '@/assets/datatheme/themec/menuright.png'
import arrowL3 from '@/assets/datatheme/themec/arrow1.png'
import arrowL3s from '@/assets/datatheme/themec/arrow2.png'
import arrowR3 from '@/assets/datatheme/themec/arrow3.png'
import arrowR3s from '@/assets/datatheme/themec/arrow4.png'
export const DATA_DASHBOARD_IMG = {
  [DATA_DASHBOARD_THEME_Map.default]: {
    headbg: "bg-[url('@/assets/screenimg/headbgimg.png')]", //头部背景
    bottombtnbgat: "bg-[url('@/assets/screenimg/foteractive.png')]", //底部按钮选中
    bottombtnbg: "bg-[url('@/assets/screenimg/nofoteractive.png')]", //底部按钮未选中
    menubgat: "bg-[url('@/assets/screenimg/activeminu.png')]", //菜单选中
    menubg: "bg-[url('@/assets/screenimg/noactiveminu.png')]", //菜单选中
    boxheadbg:data1, //盒子头部背景
    boxheadb:data1_1,//盒子头部底部背景
    selectTime:"bg-[url(@/assets/screenimg/samllIcon6.png)]",//选中的时间背景
    defaultSelectTime:"bg-[url(@/assets/screenimg/samllIcon5.png)]", //默认时间背景
    bobtnbg:"bg-[url(@/assets/datatheme/themea/bobtnbg1.png)]" ,//默认时间背景
    line:"" ,//左右竖线,
    showLeft:arrrow,//左箭头
    showLeft1:arrrow1,
    showRight:arrrow3,//右箭头
    showRight1:arrrow4,
    // bobtnbg:"bg-[url(@/assets/datatheme/themea/bobtnbg1.png)]", //默认时间背景
    menucheckleft:munuleft,//菜单切换左
    menucheckright:munuright,//菜单切换右

  },
  [DATA_DASHBOARD_THEME_Map.custom1]: {
    headbg: "bg-[url('@/assets/datatheme/themea/hebgimg.png')]",//头部背景
    bottombtnbgat: "bg-[url('@/assets/datatheme/themea/botinac.png')]",//底部按钮选中
    bottombtnbg: "bg-[url('@/assets/datatheme/themea/botin.png')]",//底部按钮未选中
    menubgat: "bg-[url('@/assets/datatheme/themea/menubgat.png')]", //菜单选中
    menubg: "bg-[url('@/assets/datatheme/themea/menubg.png')]", //菜单未选中
    boxheadbg:data2, //盒子头部背景
    boxheadb:'',//盒子头部底部背景
    selectTime:"bg-[url(@/assets/datatheme/themeb/samllIcon6.png)]",//选中的时间背景
    defaultSelectTime:"bg-[url(@/assets/datatheme/themeb/samllIcon5.png)]", //默认时间背景
    bobtnbg:"bg-[url(@/assets/datatheme/themea/bobtnbg2.png)]",
    menucheckleft:munuleft,//菜单切换左
    menucheckright:munuright,//菜单切换右
    // bobtnbg:"bg-[url(@/assets/datatheme/themea/bobtnbg2.png)]" ,
    line:"" ,//左右竖线,
    showLeft:arrrow,//左箭头
    showLeft1:arrrow1,
    showRight:arrrow3,//右箭头
    showRight1:arrrow4,
  },
  [DATA_DASHBOARD_THEME_Map.custom2]: {
    headbg: "bg-[url('@/assets/datatheme/themeb/hebgimg.png')]",//头部背景
    bottombtnbgat: "bg-[url('@/assets/datatheme/themeb/botinac.png')]",//底部按钮选中
    bottombtnbg: "bg-[url('@/assets/datatheme/themeb/botin.png')]",//底部按钮未选中
    menubgat: "bg-[url('@/assets/datatheme/themeb/menubgat.png')]", //菜单选中
    menubg: "bg-[url('@/assets/datatheme/themeb/menubg.png')]", //菜单未选中
    boxheadbg:datab, //盒子头部背景
    boxheadb:'',//盒子头部底部背景
    selectTime:"bg-[url(@/assets/datatheme/themeb/samllIcon6.png)]",//选中的时间背景
    defaultSelectTime:"bg-[url(@/assets/datatheme/themeb/samllIcon5.png)]", //默认时间背景
    bobtnbg:"bg-[url(@/assets/datatheme/themeb/bobtnbg.png)]",
    menucheckleft:munuleft,//菜单切换左
    menucheckright:munuright,//菜单切换右
    // bobtnbg:"bg-[url(@/assets/datatheme/themeb/bobtnbg.png)]" ,
    line:"" ,//左右竖线,
    showLeft: arrowL2,//左箭头
    showLeft1: arrowR2,
    showRight: arrowL2s,//右箭头
    showRight1: arrowR2s,
  },
  [DATA_DASHBOARD_THEME_Map.custom3]: {
    headbg: "bg-[url('@/assets/datatheme/themec/hebgimg.png')]",//头部背景
    bottombtnbgat: "bg-[url('@/assets/datatheme/themec/botinac.png')]",//底部按钮选中
    bottombtnbg: "bg-[url('@/assets/datatheme/themec/botin.png')]",//底部按钮未选中
    menubgat: "bg-[url('@/assets/datatheme/themec/menubgat.png')]", //菜单选中
    menubg: "bg-[url('@/assets/datatheme/themec/menubg.png')]", //菜单未选中
    boxheadbg:datac, //盒子头部背景
    boxheadb:'',//盒子头部底部背景
    selectTime:"bg-[url(@/assets/datatheme/themeb/time.png)]",//选中的时间背景
    defaultSelectTime:"bg-[url(@/assets/datatheme/themeb/timeNot.png)]", //默认时间背景
    bobtnbg:"bg-[url(@/assets/datatheme/themec/bobtnbg.png)]" ,
    line:"" ,//左右竖线,
    showLeft:arrowL3,//左箭头
    showLeft1:arrowR3s ,
    showRight: arrowL3s,//右箭头
    showRight1: arrowR3 ,
    // bobtnbg:"bg-[url(@/assets/datatheme/themec/bobtnbg.png)]",
    menucheckleft:menuleft,//菜单切换左
    menucheckright:menuright,//菜单切换右
  }
};
// export const getDataImg = (imgName: string) => {
//   return DATA_DASHBOARD_IMG[useDataDashboardThemeStoreHook().getDataDashboardThem()][imgName]
// }
/** 运营商 */
export const OPERATE_LIST = [
  {
    label: "移动"
  },
  {
    label: "电信"
  },
  {
    label: "联通"
  }
];
/** 渠道商 */
export const CHANNEL_LIST = [
  {
    label: "移动"
  },
  {
    label: "电信"
  },
  {
    label: "联通"
  }
];
